package service

import (
	"context"
	v1 "qiyu-contact/api/friend/v1"
)

type IFriendService interface {
	FindFriend(ctx context.Context, req *v1.FindFriendReq) (res *v1.FindFriendRes, err error)
	DelFriend(ctx context.Context, req *v1.DelFriendReq) (res *v1.DelFriendRes, err error)
	BlockFriend(ctx context.Context, req *v1.BlockFriendReq) (res *v1.BlockFriendRes, err error)
	AddFriend(ctx context.Context, req *v1.AddFriendReq) (res *v1.AddFriendRes, err error)
}

var localFriendService IFriendService

func Friend() IFriendService {
	if localFriendService == nil {
		panic("friend接口未注册或未实现")
	}
	return localFriendService
}
func RegisterFriend(friend IFriendService) {
	localFriendService = friend
}
